/**
 * Created by Adi(adi@imeth.cn) on 2018/8/30.
 */
import { stringify } from 'qs';
import request from '../utils/request';

// <!---------------------------------------- 银行通道信息  ------------------------------>

// 获取银行通道列表
export async function queryList(page) {
  return request(`/apis/bank/banks?${stringify(page)}`);
}

// 获取银行通道详情
export async function getById(id) {
  return request(`/apis/bank/banks/${id}`);
}

// 修改银行通道信息
export async function update(bank) {
  return request(`/apis/bank/banks/${bank.id}`, {
    method: 'PUT',
    body: {
      ...bank,
    },
  });
}


// 新增用户账户信息
export async function save(bank) {
  return request(`/apis/bank/banks`, {
    method: 'POST',
    body: bank,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryZdQGEXJsZvYTYhbi',
    }
  });
}
